new Vue({
  el: '#app',
  data: {
    navList: [],
    contentList:[]
  },
  methods: {
    loadNav: function () {
      var _this = this;
      axios.get('/paradise/nav').then(function (result) {
        if (result.data.code && result.data.code == 200) {
          _this.navList = result.data.data;
        } else {
          console.error("加载导航栏失败");
        }
      });
    },
    loadContent: function () {
      var _this = this;
      axios.get('/paradise/content').then(function (result) {
        if (result.data.code && result.data.code == 200) {
          _this.contentList = result.data.data;
        } else {
          console.error("加载导航栏失败");
        }
      });
    }
  },
  mounted: function () {
    //解决刷新页面问题
    this.loadNav();
    this.loadContent();
  }
});
